﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="uc_user.ascx.cs" Inherits="TDT_Project.Controller.uc_user" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<link href="../css/Telerik.css" rel="stylesheet" type="text/css" />
<asp:updatepanel ID="UpdatePanel1" runat="server">
<ContentTemplate>

    <style type="text/css">
        .style5
        {
            width: 235px;
            height: 35px;
        }
        .style8
        {
            height: 35px;
            width: 175px;
        }
        
        .UpdateProgressContent
        {
            padding: 40px;
            border: 1px dashed #C0C0C0;
            background-color: #FFFFFF;
            width: 200px;
            text-align: center;
            vertical-align: bottom;
            z-index: 1001;
            top: 40%;
            margin: 0px;
            margin-left: -141px;
            position: absolute;
        }
        
        .NoUnderLine
        {
            text-decoration: none !important;
        }
        .rcbSlide
        {
            z-index: 8001 !important;
        }
        .RadGrid_Default .rgHeader, .RadGrid_Default th.rgResizeCol
        {
            /*background: none !important;*/
        }
        /*.tdItem
    {
        padding: 0px !important;
    }*/
        .gridWiewHeader
        {
            background-color: #2D79F8 !important;
            padding: 0 !important;
        }
        .rgHeader gridWiewHeader
        {
            padding: 0 !important;
        }
        .gridWiew td
        {
            border: none;
            border-bottom: 1px solid #96CAFF !important;
        }
        .gridWiewHeader tr
        {
            height: 5px !important;
        }
    </style>
    <p>
    </p>
    
    <div style="text-align: center; font-weight: bold; color: Blue;">
        <h3>
            THÔNG TIN ĐĂNG NHẬP GIÁO VIÊN
        </h3>
    </div>
    <div style="width: 863px; padding-top: 10px; margin: auto">
        <table>
        <tr style="height: 10px;">
            <td align="left" colspan="2">
              <strong>  <asp:Label ID="lbMessage" ForeColor="Red" runat="server"></asp:Label> <strong>
            </td>
        </tr>
            <tr>
                <td class="style5">
                    <strong>Họ tên giáo viên: </strong>
                </td>
                <td class="style8">
                    <telerik:RadComboBox ID="ddlgiaovien" runat="server" DropDownWidth="200px" Skin="Vista"
                        Width="200px">
                    </telerik:RadComboBox>
                </td>
            </tr>
               <tr>
                <td class="style5">
                    <strong>Mã đăng nhập: </strong>
                </td>
                <td class="style8">
                        <telerik:RadTextBox ID="txtma_user" runat="server" Width="200px" Height="20px"
                            EnableSingleInputRendering="false" ValidationGroup="g1" Enabled="false"
                        MaxLength="500" AutoCompleteType="Disabled"
                            EnableTheming="True" CssClass="RadTextboxWhite">
                        </telerik:RadTextBox>
                </td>
            </tr>
              <tr>
                <td class="style5">
                    <strong>Tên đăng nhập: </strong>
                </td>
                <td class="style8">
                        <telerik:RadTextBox ID="txtuser" runat="server" Width="200px" Height="20px"
                            EnableSingleInputRendering="false" ValidationGroup="g1" 
                        MaxLength="500" AutoCompleteType="Disabled"
                            EnableTheming="True" CssClass="RadTextboxWhite">
                        </telerik:RadTextBox>
                </td>
            </tr>
              <tr>
                <td class="style5">
                    <strong>Mật khẩu: </strong>
                </td>
                <td class="style8">
                        <telerik:RadTextBox ID="txtmatkhau" runat="server" Width="200px" Height="20px"
                            EnableSingleInputRendering="false" ValidationGroup="g1" 
                        MaxLength="500" AutoCompleteType="Disabled"
                            EnableTheming="True" CssClass="RadTextboxWhite" TextMode="Password">
                        </telerik:RadTextBox>
                </td>
            </tr>
               <tr>
                <td class="style5">
                    <strong>Xác nhận lại mật khẩu: </strong>
                </td>
                <td class="style8">
                        <telerik:RadTextBox ID="txtxacnhan_mk" runat="server" Width="200px" Height="20px"
                            EnableSingleInputRendering="false" ValidationGroup="g1" 
                        MaxLength="500" AutoCompleteType="Disabled"
                            EnableTheming="True" CssClass="RadTextboxWhite" TextMode="Password">
                        </telerik:RadTextBox>
                </td>
            </tr>
                 <tr>
                <td class="style5">
                    <strong>Được phép sử dụng chương trình: </strong>
                </td>
                <td class="style8">
                        <asp:CheckBox ID="chklogin" runat="server" />
                </td>
            </tr>
                <tr>
            <td>
            
            </td>  
            <td align="right">
            <telerik:RadButton runat="server" ValidationGroup="p" ID="btnThemmoi" CssClass="RadButton"
                    ButtonType="ToggleButton" HoveredCssClass="RadButtonHover" Text="Thêm mới" Skin="Telerik" AutoPostBack="true"
                    Width="105px" Height="30px" onclick="btnThemmoi_Click" >
                </telerik:RadButton>
               
                </td>
                <td>
                 <telerik:RadButton runat="server" ValidationGroup="p" ID="btnGhi" CssClass="RadButton"
                    ButtonType="ToggleButton" HoveredCssClass="RadButtonHover" Text="Ghi" Skin="Telerik"  AutoPostBack="true"
                    Width="105px" Height="30px" onclick="btnGhi_Click" >
                </telerik:RadButton>
            </td> 
             <td>
                 <telerik:RadButton runat="server" ValidationGroup="p" ID="btn_tim" CssClass="RadButton"
                    ButtonType="ToggleButton" HoveredCssClass="RadButtonHover" Text="Tìm kiếm" 
                     Skin="Telerik"  AutoPostBack="true"
                    Width="105px" Height="30px" onclick="btn_tim_Click"  >
                </telerik:RadButton>
            </td>                            
        </tr>
        </table>
         <div style="width: 863px; padding-top: 10px; margin: auto">
        <telerik:RadGrid ID="gvResult_TTT" runat="server" AutoGenerateColumns="False" Width="844px"
            PageSize="50" HeaderStyle-CssClass="gridWiewHeader" PagerStyle-HorizontalAlign="Center"
            AlternatingRowStyle-CssClass="alt" PagerStyle-CssClass="gridWiewPaging" CellSpacing="0"
            GridLines="None"  OnItemCommand="gvResult_TTT_ItemCommand" 
            OnSelectedCellChanged="gvResult_TTT_SelectedCellChanged" 
            onitemdatabound="gvResult_TTT_ItemDataBound" 
            onpageindexchanged="gvResult_TTT_PageIndexChanged">
            <HeaderStyle CssClass="gridWiewHeader" />
            <PagerStyle Mode="NextPrevNumericAndAdvanced" />
             <ClientSettings>
                                <Selecting AllowRowSelect="false" />
                                <Scrolling AllowScroll="True" ScrollHeight="300" UseStaticHeaders="True" SaveScrollPosition="True"  />
                            </ClientSettings>
            <MasterTableView NoMasterRecordsText="Không tìm thấy dữ liệu." DataKeyNames="IDLogin"
                TableLayout="Fixed">
                <CommandItemSettings ExportToPdfText="Export to PDF" />
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="STT" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                        HeaderText="STT" UniqueName="STT" ReadOnly="True" HeaderStyle-Width="40">
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="TenGiaoVien" ItemStyle-HorizontalAlign="Center"
                        HeaderStyle-HorizontalAlign="Center" HeaderText="Họ tên giáo viên" UniqueName="TenGiaoVien"
                        ReadOnly="True" HeaderStyle-Width="200">
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="GiaoVienID" ItemStyle-HorizontalAlign="Center" Display="false"
                        HeaderStyle-HorizontalAlign="Center" HeaderText="ID" UniqueName="GiaoVienID"
                        ReadOnly="True" HeaderStyle-Width="200">
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="IDLogin" ItemStyle-HorizontalAlign="Center" Display="false"
                        HeaderStyle-HorizontalAlign="Center" HeaderText="ID" UniqueName="IDLogin"
                        ReadOnly="True" HeaderStyle-Width="200">
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Username" ItemStyle-HorizontalAlign="Center"
                        HeaderStyle-HorizontalAlign="Center" HeaderText="Tên đăng nhập" UniqueName="Username"
                        ReadOnly="True" HeaderStyle-Width="200">
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="BiVoHieu" ItemStyle-HorizontalAlign="Center"
                        HeaderStyle-HorizontalAlign="Center" HeaderText="Được phép sử login" UniqueName="BiVoHieu"
                        ReadOnly="True" HeaderStyle-Width="200">
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Mk" ItemStyle-HorizontalAlign="Center" Display="false"
                        HeaderStyle-HorizontalAlign="Center" HeaderText="Mat khau" UniqueName="Mk"
                        ReadOnly="True" HeaderStyle-Width="200">
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>

                     <telerik:GridTemplateColumn HeaderText="Sửa" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Button ID="lnkEditItem" CssClass="btnEdit"  Width='19px' Height='19px' CommandArgument='<%# Eval("IDLogin") %>'
                                            CommandName="EditItem" runat="server"></asp:Button>
                                    </ItemTemplate>
                                    <HeaderStyle Width="30px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Xóa" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Button ID="lnkEditDel" CssClass="btnX"  Width='19px' Height='19px' CommandArgument='<%# Eval("IDLogin") %>' OnClientClick="javascript:return confirm('Bạn có chắc muốn xóa tin này không?');"
                                            CommandName="EditDelItem" runat="server"></asp:Button>
                                    </ItemTemplate>
                                    <HeaderStyle Width="30px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridTemplateColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="false" />
            </ClientSettings>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
        </telerik:RadGrid>
    </div>
    </div>
    </ContentTemplate>
</asp:updatepanel>
    <script language="javascript" type="text/javascript">
        function ResetMassage(time, lbMessage) {
            setTimeout(
            function () {
                document.getElementById(lbMessage).innerHTML = "";
            }, time);
        }
</script>